<template>
  <el-dialog
    v-model="prop.isShow"
    :title="prop.title"
    :width="width"
    :show-close="false"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    @close="handelClickClose"
  >
    <template #header>
      <slot name="header"></slot>
    </template>
    <slot></slot>
  </el-dialog>
</template>
<script setup>
import { defineProps, defineEmits } from "vue";
const emits = defineEmits("close");
const prop = defineProps({
  isShow: {
    type: Boolean,
    default() {
      return false;
    }
  },
  title: {
    type: String,
    default() {
      return "";
    }
  },
  list: {
    type: Array,
    default() {
      return [];
    }
  },
  width: {
    type: Number,
    default() {
      return 50;
    }
  }
});
const handelClickClose = () => {
  emits("close", false);
};
</script>
